import { axios } from '../utils/axios'
import { API_URL } from '../store/mutation-types'

export function all(requestList) {
    return Promise.all(requestList)

}

export function api(request) {
    return http({
        url: `${API_URL}${request.url}`,
        method: request.method || 'post',
        data: request.data ? request.data : ''
    })
}
export function http(request) {
    return axios({
        url: request.url,
        method: request.method || 'post',
        data: request.data ? request.data : ''
    })
}

export function _http(request) {
    return axios(request)
}